﻿<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

if(!function_exists('load_template'))
{
	function load_template($page = 'accueil', $param = array())
    {
		$CI =& get_instance();
		if($CI->session->userdata('connecte'))
        {
            $param['connecte'] = true;
            $param['nom'] = $CI->session->userdata('nom');
            $param['prenom'] = $CI->session->userdata('prenom');
            $param['courriel'] = $CI->session->userdata('courriel');
        }
        else
        {
            $param['connecte'] = false;
        }
        $CI->load->view('template', array('page' => $page, 'param' => $param));
    }
}